package com.lb.trac.controller.common.loaders;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.lb.trac.pojo.Utenti;
import com.lb.trac.service.HRPOSearchService;
import com.lb.trac.service.SearchService;

public class LoadUtentiHrpo implements HttpObjectsLoader{

	private HRPOSearchService hrpoSearchService;

	public void load(HttpServletRequest request, HttpServletResponse response) {
		Utenti[] u = (Utenti[]) request.getSession(false).getAttribute("utentiHRPO");
		if(u==null){
			u=getHrpoSearchService().findUtentiHrpo();
			request.getSession(false).setAttribute("utentiHRPO", u);
		}
	}

	public HRPOSearchService getHrpoSearchService() {
		return hrpoSearchService;
	}

	public void setHrpoSearchService(HRPOSearchService hrpoSearchService) {
		this.hrpoSearchService = hrpoSearchService;
	}

}
